package main

import (
	"fmt"
	"github.com/gomodule/redigo/redis"
)

func main() {
	c, err := redis.Dial("tcp", "127.0.0.12.9:6379",
		redis.DialDatabase(3))
	if err != nil {
		fmt.Println("connect redis failed,", err)
		return
	}

	defer c.Close()
	_, err = c.Do("lpush", "book_list", "count", "ceg", 300)
	if err != nil {
		fmt.Println(err)
		return
	}

	r, err := redis.String(c.Do("lpop", "book_list"))
	if err != nil {
		fmt.Println("get count failed,", err)
		return
	}
	fmt.Println(r)

}
